package top.likeqc.leetcode.editor.cn;
/** 题目编号: */
public class RemoveElement {
    public static void main(String[] args) {
        Solution solution = new RemoveElement().new Solution();
    }
    // leetcode submit region begin(Prohibit modification and deletion)
    class Solution {
        public int removeElement(int[] nums, int val) {
            int left;
            left = 0;
            for (int i = 0; i < nums.length; i++) {
                if (nums[i] == val) {
                    continue;
                }
                nums[left++] = nums[i];
            }
            return left;
        }
    }
    // leetcode submit region end(Prohibit modification and deletion)

}
